package com.tuyou; /**
 * Meituan.com Inc.
 * Copyright (c) 2010-2018 All Rights Reserved.
 */

/**
 * <p></p>
 *
 * @author tuyou@meituan.com
 * @version v0.1 2018-11-25 4:21 PM tuyou Exp $$
 */
public class Person {

    private String name;
    private int age;

    private Son son;

    public Person(){}

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String say(String otherPerson) {
        String str = "hello " + otherPerson + ", my name is:" + name;
        return str;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Son getSon() {
        return son;
    }

    public void setSon(Son son) {
        this.son = son;
    }

    public String saySonName(){
        return son.getName();
    }
}